<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ez="http://java.sun.com/jsf/composite/demo"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/templates/common.xhtml">

	<ui:define name="pageHeader">
			Nossas Compras
		</ui:define>

	<ui:define name="mainSection">
		<div class="twelve columns">
			<h:form id="calculateForm">
					<p:tabView >
						<p:tab title="Notas">
						<!-- LIST -->
							<p:dataTable value="#{invoiceMB.selectedInvoices}" var="invoice"
								id="invoiceList">
		
								<p:column headerText="Detalhe da Nota">
									<h:outputText value="#{invoice.details}" />
								</p:column>
		
								<p:column headerText="Pagador">
									<h:outputText value="#{invoice.payer.fullName}" />
								</p:column>
		
								<p:column headerText="Data">
									<h:outputText value="#{invoice.shoppingDate}"
										converter="DateConverter" />
								</p:column>
		
								<p:column headerText="Total">
									<h:outputText value="#{invoice.total}" />
								</p:column>
		
							</p:dataTable>
						</p:tab>
						
						<p:tab title="Calcular">
						<!-- LIST -->
							<p:dataTable value="#{invoiceMB.selectedInvoices}" var="invoice"
								id="invoiceList">
		
								<p:column headerText="Detalhe da Nota">
									<h:outputText value="#{invoice.details}" />
								</p:column>
		
								<p:column headerText="Pagador">
									<h:outputText value="#{invoice.payer.fullName}" />
								</p:column>
		
								<p:column headerText="Data">
									<h:outputText value="#{invoice.shoppingDate}"
										converter="DateConverter" />
								</p:column>
		
								<p:column headerText="Total">
									<h:outputText value="#{invoice.total}" />
								</p:column>
		
							</p:dataTable>
						</p:tab>
					</p:tabView>
				
			</h:form>
		</div>
	</ui:define>

</ui:composition>
</html>